#ifndef _UBT_CHARGE_API_H_
#define _UBT_CHARGE_API_H_

enum ubt_msg_type
{
    ubt_msg_type_req_startcharge = 1,	//开始充电 (任务Id不能为*),请求类, 响应消息是129,但可能收到130,131的反馈消息
    //extInfo的值格式为 dis=xxx&flag=0, dis为停靠点到充电桩的直线距离,flag中 0x02 是否暂停中 )
    ubt_msg_type_req_cancelcharge = 2,  //取消充电(需要离开充电桩),请求类, taskId应与1中相匹配, 响应消息是129
    ubt_msg_type_req_stopcharge = 3,	//停止充电(不需离开充电桩),请求类, taskId应与1中相匹配, 响应消息是129
    ubt_msg_type_req_pause = 4,  //暂停,请求类, taskId应与1中相匹配, 响应消息是130
    ubt_msg_type_req_continue = 5,	//继续,请求类, taskId应与1中相匹配, 响应消息是130


    ubt_msg_type_rsp_charge_rsp = 129, //充电结束,响应类,value1为charge_result,后续不会再有该任务Id的其他消息了
    ubt_msg_type_nty_chargestatus = 130, //充电状态切换,上报类, value1为charge_status,value2 为 flag,0x02 是否暂停中
    ubt_msg_type_nty_chargeprogress = 131, //充电进度,上报类, value1为当前电量,百分制
};
#define ubt_charge_flag_pause 0x02


enum ubt_charge_result
{
    ubt_charge_result_ok = 0,//成功
    ubt_charge_result_busy,	 //忙
    ubt_charge_result_badCmd,//消息类型不识别
    ubt_charge_result_badParam,//请求参数有错

    ubt_charge_result_canceled = 101, //被取消
    ubt_charge_result_stopped,//被停止
    ubt_charge_result_failbtystatus, //电池状态失败
    ubt_charge_result_failprepare,	 //准备中失败
    ubt_charge_result_failenter,	 //驶入中失败
    ubt_charge_result_failcheck,	 //对接检测中失败
    ubt_charge_result_failcharge, 	 //充电中失败
    ubt_charge_result_failleave,	 //离开失败
};

enum ubt_charge_status
{
    ubt_charge_status_idle,		//空闲
    ubt_charge_status_prepare,	//准备中
    ubt_charge_status_entering,	//驶入充电桩
    ubt_charge_status_checking, //对接及检测中
    ubt_charge_status_charging, //充电中
    ubt_charge_status_leaving	//驶出充电桩,清理
};

#endif

